package io;

import sun.applet.Main;

import java.io.FileOutputStream;
import java.io.IOException;

public class AutoCloseableDemo {
    public static void main(String[] args) {
        System.out.println("程序开始了");
        try (
                FileOutputStream fos = new FileOutputStream("./a/b/fos.dat");

        ) {
            fos.write(1);

        } catch (IOException e) {
            System.out.println("IO异常解决了");

        }
        System.out.println("程序结束了");
    }
}
